﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GrouponDesktop.ListadoEstadistico
{
    public partial class ListadoEstadist : Form
    {
        public ListadoEstadist()
        {
            InitializeComponent();
        }

        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void b_busc_Click(object sender, EventArgs e)
        {

            if (comboBox1.Text == "Primeros 5 proveedores por porcentaje de devoluciones")
            {


                string query = "Exec CodingSpree.listestadistico_porcentaje '";
                query = query + semestre.Text + "', '";
                query = query + anio.Text + "'";

                BDConnection.FillGrid(query, dgvEstadistico);
               



            }
            else
            {


                string query = "EXEC CodingSpree.listestadistico_giftcard_usuario '";
                query = query + semestre.Text + "', '";
                query = query + anio.Text + "'";

                BDConnection.FillGrid(query, dgvEstadistico);


            }
        }
    }
}
